  <div id="header">
    <div id="mainHeader">
      <div id="userBar">
        <?php 
          if (isset($_SESSION['username'])) echo $this->Html->link($_SESSION['username'], array('controller'=>'users','action' => 'userCenter', $_SESSION['userid']))."|".$this->Html->link('登出', array('controller'=>'users','action' => 'logout', $_SESSION['userid']));
          else echo $this->Html->link("登陆", array('controller'=>'users','action' => 'login')).'|'.$this->Html->link("注册", array('controller'=>'users','action' => 'register'));
        ?>
      </div>

      <div id="topNav">
        <ul>
          <li><?php echo $this->Html->link($this->Html->image('user.png',array('class' => 'topNavPic'))."首页",array('controller' => 'recipes', 'action' => 'view'),array('escape' => false)); ?></li>
          <li><?php echo $this->Html->image('map.png', array('class' => 'topNavPic')); ?>菜谱大全</li>
          <li><?php echo $this->Html->image('folder.png', array('class' => 'topNavPic')); ?>精品菜单</li>
          <li><?php echo $this->Html->image('leaf.png', array('class' => 'topNavPic')); ?>食材大全</li>
        </ul>
      </div>

      <div class="clearFix"></div>
    </div>
  </div>
  <div id="subHeader">
    <div id="toolBar">
      <div id="subNav">
        <?php echo $this->Html->image('logo.png', array('id' => 'logo' ,'height' => '80')); ?>
        <ul>
          <div id="choose">发现你的最爱</div>
          <li><?php
           echo $this->Html->link(
            $this->Html->image(
              'heart.png',
               array('class' => 'subNavPic','width' => '32')
            )."<br />评分最高",
            array('controller'=>'recipes','action' => 'viewByStars'),
            array('escape' => false)
          ); ?></li>
          <li><?php
           echo $this->Html->link(
            $this->Html->image(
              'comment.png',
               array('class' => 'subNavPic','width' => '32')
            )."<br />留言最多",
            array('controller'=>'recipes','action' => 'viewByComments'),
            array('escape' => false)
          ); ?></li>
          <li><?php
           echo $this->Html->link(
            $this->Html->image(
              'clock.png',
               array('class' => 'subNavPic','width' => '32')
            )."<br />时间最新",
            array('controller'=>'recipes','action' => 'viewByTime'),
            array('escape' => false)
          ); ?></li>
          <li><?php
           echo $this->Html->link(
            $this->Html->image(
              'bulb.png',
               array('class' => 'subNavPic','width' => '32')
            )."<br />浏览发现",
            array('controller'=>'recipes','action' => 'view'),
            array('escape' => false)
          ); ?></li>
        </ul>
      </div>

      <div id="search">
        <form method="GET" action="<?php echo $this->Html->url(array('controller' => 'recipes', 'action' => 'search')); ?>" id="searchForm">
          <div id="selector">标题▼</div><ul id="selectorList"><li val="name">标题</li><li val="ingredient">配料</li><li val="tags">标签</li><li val="content">步骤</li></ul><input type="hidden" id="field" name="field" value="name" /><input type="input" x-webkit-speech speech id="search-input" name="query" placeholder="搜索全站"/><input type="submit" id="search-btn" value=""/><br />
          <div id="chooseOrder">
            <label for="order">排序：</label>
            <input type="radio" name="order" value="createdTime" checked>时间</input>
            <input type="radio" name="order" value="totalStars">评分</input>
            <input type="radio" name="order" value="commentsNumber">留言</input>
          </div>
        </form>
      </div>

      <div class="clearFix"></div>
    </div>
  </div>